<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
<head>
   <title> College Result List Page</title>
</head>

<body>
<h:form>
   <h:outputLabel value="#{userBean.accountInfo.firstname}'s College Result List " />
<br></br>
<br></br>
   <c:choose>  
      <c:when test="${empty userBean.resultList.college1}"> 
         <h:outputText value="No Collges Selected"></h:outputText>
      </c:when>  
      <c:otherwise>  
         <h:panelGrid columns="3"  style="margin-bottom:10px" cellpadding="5">  
            <h:outputText value="College 1 :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.college1} "></h:outputText>
            <h:outputText value=""></h:outputText>

            <h:outputText value="Action Taken :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.result1} "></h:outputText>
            <h:selectOneMenu value="#{modifyResult.entered_result1}">
               <f:selectItem itemLabel="Select One" itemValue="" />
               <f:selectItem itemLabel="No Action Taken" itemValue="NO ACTION" />
               <f:selectItem itemLabel="Did Not Apply" itemValue="DID NOT APPLY" />
               <f:selectItem itemLabel="Rejected" itemValue="REJECTED" />
               <f:selectItem itemLabel="Accepted" itemValue="ACCEPTED" />
               <f:selectItem itemLabel="Attend" itemValue="ATTEND" />
            </h:selectOneMenu>


            <h:outputText value="College 2 :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.college2} "></h:outputText>
            <h:outputText value=""></h:outputText>

            <h:outputText value="Action Taken :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.result2} "></h:outputText>
            <h:selectOneMenu value="#{modifyResult.entered_result2}">
               <f:selectItem itemLabel="Select One" itemValue="" />
               <f:selectItem itemLabel="No Action Taken" itemValue="NO ACTION" />
               <f:selectItem itemLabel="Did Not Apply" itemValue="DID NOT APPLY" />
               <f:selectItem itemLabel="Rejected" itemValue="REJECTED" />
               <f:selectItem itemLabel="Accepted" itemValue="ACCEPTED" />
               <f:selectItem itemLabel="Attend" itemValue="ATTEND" />
            </h:selectOneMenu>


            <h:outputText value="College 3 :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.college3} "></h:outputText>
            <h:outputText value=""></h:outputText>

            <h:outputText value="Action Taken :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.result3} "></h:outputText>
            <h:selectOneMenu value="#{modifyResult.entered_result3}">
               <f:selectItem itemLabel="Select One" itemValue="" />
               <f:selectItem itemLabel="No Action Taken" itemValue="NO ACTION" />
               <f:selectItem itemLabel="Did Not Apply" itemValue="DID NOT APPLY" />
               <f:selectItem itemLabel="Rejected" itemValue="REJECTED" />
               <f:selectItem itemLabel="Accepted" itemValue="ACCEPTED" />
               <f:selectItem itemLabel="Attend" itemValue="ATTEND" />
            </h:selectOneMenu>


            <h:outputText value="College 4 :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.college4} "></h:outputText>
            <h:outputText value=""></h:outputText>

            <h:outputText value="Action Taken :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.result4} "></h:outputText>
            <h:selectOneMenu value="#{modifyResult.entered_result4}">
               <f:selectItem itemLabel="Select One" itemValue="" />
               <f:selectItem itemLabel="No Action Taken" itemValue="NO ACTION" />
               <f:selectItem itemLabel="Did Not Apply" itemValue="DID NOT APPLY" />
               <f:selectItem itemLabel="Rejected" itemValue="REJECTED" />
               <f:selectItem itemLabel="Accepted" itemValue="ACCEPTED" />
               <f:selectItem itemLabel="Attend" itemValue="ATTEND" />
            </h:selectOneMenu>


            <h:outputText value="College 5 :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.college5} "></h:outputText>
            <h:outputText value=""></h:outputText>

            <h:outputText value="Action Taken :"></h:outputText>
            <h:outputText value=" #{userBean.resultList.result5} "></h:outputText>
            <h:selectOneMenu value="#{modifyResult.entered_result5}">
               <f:selectItem itemLabel="Select One" itemValue="" />
               <f:selectItem itemLabel="No Action Taken" itemValue="NO ACTION" />
               <f:selectItem itemLabel="Did Not Apply" itemValue="DID NOT APPLY" />
               <f:selectItem itemLabel="Rejected" itemValue="REJECTED" />
               <f:selectItem itemLabel="Accepted" itemValue="ACCEPTED" />
               <f:selectItem itemLabel="Attend" itemValue="ATTEND" />
            </h:selectOneMenu>
<br></br>
            <h:commandButton value="  Update  " 
                             action="#{modifyResult.saveResultList}"/>
         </h:panelGrid>
      </c:otherwise>  
   </c:choose>  
</h:form>
<h:form>
<br></br>
<br></br>
   <h:commandButton value="Generate List" 
                    action="#{modifyResult.generateResultList}"/>

   <h:commandButton value="Return to Main" 
                    action="#{commonBean.returnToMain}"/>
</h:form>
</body>
</html>